function getInfoByZhyfqid(id) {
    var hr = null;
    $.ajax({
        url: '/geoZhyfq/getInfoByid',
        async: false,
        method: 'get',
        dataType: "json",
        data: {"id": id},
        contentType: 'application/text;charset=utf-8',
        success: function (data) {
            hr = data;
        },
        error: function (ee) {
        }
    });
    return hr;
}


function gis_ContainsZhyfq(coords) {
    var loading = layer.msg('正在加载', {icon: 16, shade: 0.3})
    $.ajax({
        url: '/geoZhyfq/gis_Contains',
        async: false,
        method: 'get',
        dataType: "json",
        data: {"coords": coords},
        contentType: 'application/text;charset=utf-8',
        success: function (data) {
            showQresult(data, false, 1);
            return loading;
        },

        error: function (ee) {
        }
    });

}


function GetAllZhyfq(geoZhyfq) {
    var hr = null;
    $.ajax({
        url: '/geoZhyfq/GetAll',
        async: false,
        method: 'post',
        dataType: "json",
        data: JSON.stringify(geoZhyfq),
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            hr = data;
        },

        error: function (ee) {
        }
    });
    return hr;
}


function getZhyfqByKeywords(keywords) {
    var loading = layer.msg('正在加载', {icon: 16, shade: 0.3})

    $.ajax({
        url: '/geoZhyfq/getZhyfqByKeywords',
        async: false,
        method: 'get',
        dataType: "json",
        data: {"keywords": keywords},
        contentType: 'application/text;charset=utf-8',
        success: function (data) {
            showQresult(data, false, 1);
            return loading;
        },

        error: function (ee) {

        }
    });

}
function getZhyfqByNd(nd, type, state) {
    var loading = layer.msg('正在加载', {icon: 16, shade: 0.3})

    $.ajax({
        url: '/geoZhyfq/getZhyfqByNd',
        method: 'get',
        dataType: "json",
        data: {"nd": nd},
        contentType: 'application/text;charset=utf-8',
        success: function (data) {
            showQresult(data, true, type);
            if (state == 1) {
                markerClustererYFQ.addMarkers(QResultLayerYFQ);
            }
            layer.close(loading);
        },

        error: function (ee) {
            layer.close(loading);
        }
    });

}

